using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class gsrateMap : EntityTypeConfiguration<gsrate>
    {
        public gsrateMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.CODE)
                .HasMaxLength(3);

            this.Property(t => t.NAME)
                .HasMaxLength(20);

            this.Property(t => t.File_Primary_Key)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("gsrate");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.CODE).HasColumnName("CODE");
            this.Property(t => t.NAME).HasColumnName("NAME");
            this.Property(t => t.FACTOR).HasColumnName("FACTOR");
            this.Property(t => t.Rate).HasColumnName("Rate");
            this.Property(t => t.Gs).HasColumnName("Gs");
            this.Property(t => t.File_Primary_Key).HasColumnName("File Primary Key");
        }
    }
}
